import React, {Component, Fragment} from 'react'
import { List, Avatar } from 'antd';

class ListCom extends Component {
    // constructor(props){
    //   super(props)
    // }

    render(){
        return (
            <Fragment>
                <List
                    itemLayout="horizontal"
                    dataSource={this.props.data}
                    renderItem={item => (
                    <List.Item>
                        <List.Item.Meta
                        avatar={<Avatar src={item.avatar} />}
                        title={item.title}
                        description={item.description}
                        /><div>{item.creat_at}</div>
                    </List.Item>
                    )}
                />
            </Fragment>    
        )
    }

}

export default ListCom